package com.heima.behavior.controller.v1;


import com.heima.behavior.service.ApCollectionBehaviorService;
import com.heima.model.behavior.dtos.CollectionBehaviorDTO;
import com.heima.model.behavior.pojos.ApCollection;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api("用户收藏行为")
@RequestMapping("/api/v1")
public class ApCollectBehaviorController {
    @Autowired
    private ApCollectionBehaviorService apCollectionBehaviorService;

    /**
     * 用户收藏行为
     * @param dto
     * @return
     */
    @ApiOperation("收藏行为的方法")
    @PostMapping("/collection_behavior")
    private ResponseResult collection_behavior(@RequestBody @Validated  CollectionBehaviorDTO dto){
        return apCollectionBehaviorService.collectBehavior(dto);
    }




}
